package org.bhf.providers.security.authorization.dbpolicy.oracle;

import org.bhf.db.migration.Migration;
import org.bhf.db.migration.Util;

import javax.persistence.EntityManager;
import javax.persistence.PersistenceException;
import java.io.IOException;

public class Migrate0 implements Migration
{
    final static String scriptBase = Migrate0.class.getPackage().getName().replace( '.', '/' ) + "/";

    public void upTo( final EntityManager entityManager )
        throws IOException, PersistenceException
    {
        Util.executeStatements( entityManager, scriptBase + "0.do.sql" );
    }

    public void downFrom( final EntityManager entityManager )
        throws IOException, PersistenceException
    {
        Util.executeStatements( entityManager, scriptBase + "0.undo.sql" );
    }
}